//
//  FirstTableCell.m
//  Four_years
//
//  Created by 中软国际088 on 15/11/10.
//  Copyright © 2015年 中软三班四年小组. All rights reserved.
//

#import "FirstTableCell.h"

@implementation FirstTableCell

//自定义第一个cell
- (id)init{

    if (self = [super init] ) {
       
        //初始化输入时间的textfiled
        _eventText = [[UITextField alloc]initWithFrame:CGRectMake(20, 0, self.frame.size.width -20, self.frame.size.height)];
        _eventText.placeholder = @"事件标题";
        _eventText.clearButtonMode = UITextFieldViewModeWhileEditing;
        _eventText.returnKeyType = UIReturnKeyDone;
        _eventText.delegate = self;
        [self.contentView addSubview:_eventText];
        
    }

    return self;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

//按完成建 键盘放弃第一响应 收回键盘
- (BOOL)textFieldShouldReturn:(UITextField *)textField{

    if (textField == _eventText) {
        [textField resignFirstResponder];
    }
    return YES;
    
}

@end
